Adding a new business object

This example creates a business object for the Name_Note table and exercises it with a query.

1.  Select Tools > Business object designer.

2.  From the toolbar, select New > Design Business Definition.
The New Object window appears.

3.  In the Name field, enter CsName_Note for this example.

4.  Click Create Object.

5.  On the Database tab, beneath the Tables list, click Add.
A window listing all the iMIS database tables appears.

6.  Select the Name_Note table and click OK.
The Name_Note table is added to the Tables list, and its columns are added to the Available Columns list.

7.  Select the Columns tab. Select all the columns except TIME_STAMP (which is used for iBO concurrency, and does not apply to this example). Select Create Property for Selected Columns.

8.  On the Properties tab, examine the automatically generated entries on the Description, Type, Display, and Value tabs.

9.  On the Display sub-tab, select the Id, NoteNumber, Note, and Purpose properties and make sure the Available to Query Builder and Automatically Include in Queries options are checked on the Definition tab for each.

10. Select Save, Close, Build, and Publish.

11. Open IQA (Tools > Intelligent query architect).

12. Create a new query in a working folder (Scratch or something similar).

13. The First Source will be under Common.Business Objects.CsName_Note. Click on it to add to the Sources list.

14. On the Display tab, note that the four columns in the display set are selected.

15. Select Save. On the Document Saver window, enter a name for the query (such as “CsName_Note query”) and select Save.

16. Select Run to see the sample output.

17. To extend the example, add the Name table to the business object, display FULL_NAME in the query results, and republish.

18. In BOD, Edit the CsName_Note business object. Select Physical, and add the Name table to the Tables list. Add Name_Note.ID=Name.ID to the Joins list, by selecting the columns from the left and right drop-down lists.

19. Select Columns, select Name.FULL_NAME, and add a property for the column.

20. On the Properties tab, select the Display sub-tab.

21. Add FullName to the Display Set.

22. Select Save, Close, Build, and Publish.

23. In IQA, open the query for this business object.

24. On the Sources tab, click the Remove icon to remove the existing source.

25. Click Add Source and re-add CsName_Note.

Note: Business object changes aren’t automatically reflected in queries that use them.

26. On the Display tab, change the order to have Id and Full Name first. Use the Refresh button as you go to confirm the order. Save the query.

27. Select Run to see the query results.

28. On the Summary tab, switch to Advanced mode to see the SQL for the query.